RCS Text Message with Buttons
RCS text message can be sent during the conversation with the end user. Conversation starts when the user clicks on the template message or sends a message. This initiates a 24 hour window during which Enterprise gets two free messages on every user’s action (click or reply). A text message can be sent with up to 10 buttons in any combination of quick reply; open a URL; dial a number; and send a location For sending the RCS text message with buttons, Choice Message object to be sent in message object. Details below:
S.No. | Attribute | Required | Datatype | Details |
---|---|---|---|---|
3.1. | choice_message | Yes | Object | Specifying the text message with buttons. |
3.1.1. | text_message | Yes | String | Object for mentioning the text to be sent. |
3.1.1.1. | text | Yes | String | The text to be sent. |
3.1.2. | choices | No | Array of objects | The number of choices is limited to 10. Select any combination of choices from below objects |
3.1.2.1. | call_message | No | Object | Button for triggering the call. |
3.1.1.2.1. | phone_number | Yes | String | Phone number in E.164 with leading +. E.g. +919876543210 |
3.1.1.2.2. | title | Yes | String | Title of the button |
3.1.2.2. | postback_data | Yes | String | Value is returned in the Click event of the accompanying button |
3.1.2.1. | location_message | No | Object | Button containing geographic location |
3.1.1.1.1. | coordinates | Yes | Object | Containing latitude and longitude of the location |
3.1.1.1.1.1. | latitude | Yes | Number | Latitude of location |
3.1.1.1.1.2. | longitude | Yes | Number | Longitude of location |
3.1.1.1.2. | title | Yes | String | Title of the button |
3.1.2.2. | postback_data | Yes | String | Value is returned in the Click event of the accompanying button |
3.1.2.1. | url_message | No | Object | Button for opening a URL |
3.1.1.1.1. | url | Yes | String | The URL to open |
3.1.1.1.2. | title | Yes | String | Title of the button |
3.1.2.2. | postback_data | Yes | String | Value is returned in the Click event of the accompanying button |
3.1.2.1. | text_message | No | Object | Button for quick reply from the end user |
3.1.1.1.1. | text | Yes | String | This is the button title as well as text to be sent from the end user |
3.1.2.2. | postback_data | Yes | String | Value is returned in the Click event of the accompanying button |
{
"app_id": "01H0MFFJFX0YAWYA5XG4D3MRTA",
"recipient": {
"identified_by": {
"channel_identities": [
{
"channel": "RCS",
"identity": "917023002081"
}
]
}
},
"message": {
"choice_message": {
"text_message": {
"text": "Friendly reminderof your appointmenttomorrow at 10AM. Please confirmyourbookin
g by replying below."
},
"choices": [
{
"text_message": {
"text": "Confirm"
},
"postback_data": "reply"
},
{
"call_message": {
"title": "Call Us",
"phone_number": "+917023002081"
},
"postback_data": "call"
},
{
"location_message": {
"title": "Location",
"label": "Our Office",
"coordinates": {
"latitude": "28.5147",
"longitude": "77.3782"
}
},
"postback_data": "location"
},
{
"url_message": {
"title": "Know More",
"url": "https://www.aclmobile.com/"
},
"postback_data": "open a url"
}
]
}
}
}